# 13.2
try:
    x = 6 / 8
except ZeroDivisionError:
    print("除数为0的情况，出现了。")
else:
    print(x)
finally:
    print("这里一定会被执行")
    print("刚刚尝试了一次除法运算")

print("这里是try后面的语句，一定会被执行的")
print()

# 13.3
# 针对一个加法运算的函数，进行单元测试
import unittest
from testplus import plus

class myTest(unittest.TestCase):
    def test_myplus1(self):
        x = plus(3, 6)
        self.assertEqual(x, 9)
    def test_myplus2(self):
        x = plus(0, 1)
        self.assertEqual(x,1)

if __name__ == "__main__":
    unittest.main()